package com.xjgzinfo.usdp.service.dto;

import com.xjgzinfo.usdp.jpa.service.Criteria;
import com.xjgzinfo.usdp.jpa.service.filter.*;

import java.io.Serializable;
import java.util.Objects;

/**
 * Criteria class for the {@link com.xjgzinfo.usdp.domain.BladeVisual} entity. This class is used
 * in {@link com.xjgzinfo.usdp.web.rest.BladeVisualResource} to receive all the possible filtering options from
 * the Http GET request parameters.
 * For example the following could be a valid request:
 * {@code /blade-visuals?id.greaterThan=5&attr1.contains=something&attr2.specified=false}
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 * fix type specific filters.
 */
public class BladeVisualCriteria implements Serializable, Criteria {

    private static final long serialVersionUID = 1L;

    private LongFilter id;

    private LongFilter category;

    private StringFilter title;

    private LongFilter updateUser;

    private StringFilter password;

    private LongFilter createUser;

    private InstantFilter updateTime;

    private LongFilter createDept;

    private InstantFilter createTime;

    private IntegerFilter status;

    private IntegerFilter isDeleted;

    public BladeVisualCriteria() {
    }

    public BladeVisualCriteria(BladeVisualCriteria other) {
        this.id = other.id == null ? null : other.id.copy();
        this.category = other.category == null ? null : other.category.copy();
        this.title = other.title == null ? null : other.title.copy();
        this.updateUser = other.updateUser == null ? null : other.updateUser.copy();
        this.password = other.password == null ? null : other.password.copy();
        this.createUser = other.createUser == null ? null : other.createUser.copy();
        this.updateTime = other.updateTime == null ? null : other.updateTime.copy();
        this.createDept = other.createDept == null ? null : other.createDept.copy();
        this.createTime = other.createTime == null ? null : other.createTime.copy();
        this.status = other.status == null ? null : other.status.copy();
        this.isDeleted = other.isDeleted == null ? null : other.isDeleted.copy();
    }

    @Override
    public BladeVisualCriteria copy() {
        return new BladeVisualCriteria(this);
    }

    public LongFilter getId() {
        return id;
    }

    public void setId(LongFilter id) {
        this.id = id;
    }

    public LongFilter getCategory() {
        return category;
    }

    public void setCategory(LongFilter category) {
        this.category = category;
    }

    public StringFilter getTitle() {
        return title;
    }

    public void setTitle(StringFilter title) {
        this.title = title;
    }

    public LongFilter getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(LongFilter updateUser) {
        this.updateUser = updateUser;
    }

    public StringFilter getPassword() {
        return password;
    }

    public void setPassword(StringFilter password) {
        this.password = password;
    }

    public LongFilter getCreateUser() {
        return createUser;
    }

    public void setCreateUser(LongFilter createUser) {
        this.createUser = createUser;
    }

    public InstantFilter getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(InstantFilter updateTime) {
        this.updateTime = updateTime;
    }

    public LongFilter getCreateDept() {
        return createDept;
    }

    public void setCreateDept(LongFilter createDept) {
        this.createDept = createDept;
    }

    public InstantFilter getCreateTime() {
        return createTime;
    }

    public void setCreateTime(InstantFilter createTime) {
        this.createTime = createTime;
    }

    public IntegerFilter getStatus() {
        return status;
    }

    public void setStatus(IntegerFilter status) {
        this.status = status;
    }

    public IntegerFilter getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(IntegerFilter isDeleted) {
        this.isDeleted = isDeleted;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final BladeVisualCriteria that = (BladeVisualCriteria) o;
        return
                Objects.equals(id, that.id) &&
                        Objects.equals(category, that.category) &&
                        Objects.equals(title, that.title) &&
                        Objects.equals(updateUser, that.updateUser) &&
                        Objects.equals(password, that.password) &&
                        Objects.equals(createUser, that.createUser) &&
                        Objects.equals(updateTime, that.updateTime) &&
                        Objects.equals(createDept, that.createDept) &&
                        Objects.equals(createTime, that.createTime) &&
                        Objects.equals(status, that.status) &&
                        Objects.equals(isDeleted, that.isDeleted);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                id,
                category,
                title,
                updateUser,
                password,
                createUser,
                updateTime,
                createDept,
                createTime,
                status,
                isDeleted
        );
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "BladeVisualCriteria{" +
                (id != null ? "id=" + id + ", " : "") +
                (category != null ? "category=" + category + ", " : "") +
                (title != null ? "title=" + title + ", " : "") +
                (updateUser != null ? "updateUser=" + updateUser + ", " : "") +
                (password != null ? "password=" + password + ", " : "") +
                (createUser != null ? "createUser=" + createUser + ", " : "") +
                (updateTime != null ? "updateTime=" + updateTime + ", " : "") +
                (createDept != null ? "createDept=" + createDept + ", " : "") +
                (createTime != null ? "createTime=" + createTime + ", " : "") +
                (status != null ? "status=" + status + ", " : "") +
                (isDeleted != null ? "isDeleted=" + isDeleted + ", " : "") +
                "}";
    }

}
